package cn.tqfeiyang.smartadmin.commons.validation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * 是否是IPV4地址
 *
 * @author tqfeiyang
 * @since 2024/10/12 9:47
 */
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = { Validators.IsIpv4Validator.class })
public @interface IsIpv4 {

    String message() default "无效的IPV4地址";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
